package com.utils;

import com.enums.ReturnCode;

import java.util.Map;

/**
 *  返回码的设置
 */
public class ReturnCodeUtils {
    public static void setReturnCode(Map<String,Object> result, ReturnCode returnCode){
        result.put("status",returnCode.name());
        result.put("msg", returnCode.toString());
    }

    //添加后缀描述  例如   失败_获取下拉列表
    public static void setReturnCode(Map<String,Object> result, ReturnCode returnCode,String suffix){
        result.put("status", returnCode.name());
        result.put("msg",returnCode.toString()+"-"+suffix);
    }
}
